'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);

  router.post('/api/login', controller.home.login);
  router.post('/api/register', controller.home.register);

  router.get('/api/identity', controller.home.identity)

  // 
  // addCourse
  router.post('/api/addCourse', controller.class.addCourse);
  // findCourse
  router.get('/api/findCourse', controller.class.findCourse);
  // addRoom
  router.post('/api/addRoom', controller.class.addRoom);
  // findRoom
  router.get('/api/findRoom', controller.class.findRoom);
  // addClassGrade
  router.post('/api/addClassGrade', controller.class.addClassGrade);
};
